package com.lysj.admin.master.common;

import cn.hutool.core.io.FileUtil;

import java.io.File;

/**
 * @author Created by zk on 2019-11-28 18:33
 * @description 常量
 */
public interface CommonConstant {
    Integer DEL_FLAG = -1;

    Integer NORMAL_FLAG = 1;

    String UNKNOWN = "unknown";

    String TOKEN_HEADER_NAME = "authorized";

    String PROJECT_PATH = "com.lysj.admin.master";

    String SNOW_FLAKE_ID_STRATEGY = PROJECT_PATH + ".common.snowflake.SnowFlakeIdStrategy";

    /**
     * @author Created by zk on 2018/12/26 10:05
     * @Description 以下为基础实体的字段名 base.BaseEntity
     */
    String ID_NAME = "id";
    String NAME_NAME = "name";
    String CREATE_TIME_NAME = "createTime";
    String UPDATE_TIME_NAME = "updateTime";
    String DEL_FLAG_NAME = "del_flag";

    String COMPANY_ID_NAME = "companyId";
    String AGENT_ID_NAME = "agentId";
    String EMPLOYEE_ID_NAME = "employeeId";

    String ADMIN_ROLE_ID = "1";

    String ADMIN_ISSUER = "auth";  //管理员
    String AGENT_ISSUER = "agent"; //代理商
    String COMPANY_ISSUER = "company"; //用工平台
    String EMPLOYEE_ISSUER = "employee"; //雇员

    Integer ADMIN_TOKEN_EXPIRATION = 60 * 12;//分钟数
    Integer ADMIN_TOKEN_REFRESH = 15;//分钟数


    String JWT_ISS = "iss";
    String JWT_SUB = "sub";

    String INTERFACE_PASSWORD = "123456qwer..";//全局接口密码
    String JWT_PAYLOAD_KEY = "payload";//作为传输payload的key


    String PROJECT_NAME = "caishui";//项目名称 用于静态文件项目级分包
    String THUMBNAIL = "thumbnail";//缩略图文件夹名
    String FILE_SEPARATOR = File.separator;//文件分隔符
    String FILE_PATH = FileUtil.getUserHomePath()+FILE_SEPARATOR+"project_static"+FILE_SEPARATOR+PROJECT_NAME+FILE_SEPARATOR;//静态文件上传路径


}
